LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)

LOCAL_MODULE := vendor.gwm.media.c2.nbcodec@1.1-service
LOCAL_MODULE_TAGS := optional
LOCAL_PROPRIETARY_MODULE := true
LOCAL_MODULE_RELATIVE_PATH := hw
LOCAL_VINTF_FRAGMENTS := android.hardware.media.c2.nbcodec@1.1-service-vintf.xml
LOCAL_INIT_RC := vendor.gwm.media.c2.nbcodec@1.1-service.rc

LOCAL_REQUIRED_MODULES := \
    vendor.gwm.media.c2.nbcodec@1.1-service-ffmpeg.policy \
    media_codecs_ffmpeg_c2.xml

LOCAL_SRC_FILES := \
    C2FFMPEGAudioDecodeComponent.cpp \
    C2FFMPEGAudioDecodeInterface.cpp \
    C2FFMPEGVideoDecodeComponent.cpp \
    C2FFMPEGVideoDecodeInterface.cpp \
    service.cpp

LOCAL_SHARED_LIBRARIES := \
    android.hardware.media.c2@1.1 \
    libavservices_minijail \
    libbase \
    libbinder \
    libcodec2_hidl@1.1 \
    libcodec2_soft_common \
    libcodec2_vndk \
    libhidlbase \
    liblog \
    libstagefright_foundation \
    libutils

LOCAL_SHARED_LIBRARIES += \
    libffmpeg_utils \
    libswresample_vnd \
    libswscale_vnd \
    libavcodec_vnd \
    libavutil_vnd

LOCAL_CFLAGS := \
    -DTARGET_CONFIG=\"config-$(TARGET_ARCH_VARIANT).h\"

LOCAL_CFLAGS += -DTARGET_VENDOR

include $(BUILD_EXECUTABLE)

include $(call all-makefiles-under,$(LOCAL_PATH))
